#ifndef DW_GRAPHICS_SUBMESH_H
# define DW_GRAPHICS_SUBMESH_H

#include "graphics/renderer.h"

namespace dw
{
namespace graphics
{

class SubMesh
{
// Constructors
public:

																	SubMesh();

																	SubMesh(primitive::types primitiveType, const uint32 indexStart, const uint32 indexCount, const uint32 vertexIndexStart, const uint32 vertexIndexEnd, const std::string& materialName);

																	~SubMesh();

// Methods
public :
	primitive::types getPrimitiveType()	const { return _primitiveType; }

	const uint32 getIndexStart()				const { return _indexStart; }

	const uint32 getIndexCount()				const { return _indexCount; }

	const uint32 getVertexIndexStart()	const { return _vertexIndexStart; }

	const uint32 getVertexIndexEnd()		const { return _vertexIndexEnd; }

	const std::string& getMaterialName()			const { return _materialName; }

// Fields
private:

	primitive::types _primitiveType;

	uint32 _indexStart;
	
	uint32 _indexCount;

	uint32 _vertexIndexStart;

	uint32 _vertexIndexEnd;
	
	std::string _materialName;

private:

	friend
	std::ostream& operator<<(std::ostream& os, const SubMesh& subMesh);
	
	friend
	std::istream& operator>>(std::istream& is, SubMesh& subMesh);

};

} // namespace graphics 
} // namespace dw

#endif // !DW_GRAPHICS_SUBMESH_H
